package com.sumainfor.wx.system.gmio.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.wx.system.gmio.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Meng
 * @ClassName ArticleController
 * @date 2019/8/12 16:10
 * @description: TODO 房源设备
 */
@RestController
@RequestMapping("/article")
public class ArticleController {

    @Autowired
    private ArticleService articleService;

    /**
     * @Description //TODO 获取设备分类列表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/12 16:13
     **/
    @GetMapping("getArticleTypeList")
    public JsonResult getArticleTypeList(@RequestParam Map<String, Object> params) {

        return articleService.getArticleTypeList(params);
    }

    /**
     * @Description //TODO 根据设备类目获取设备列表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/12 16:17
     **/
    @GetMapping("getArticleList")
    public JsonResult getArticleList(@RequestParam Map<String, Object> params) {

        return articleService.getArticleList(params);
    }

    /**
     * @Description //TODO 根据设备id获取设备问题列表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/12 16:19
     **/
    @GetMapping("getArticleTroubleList")
    public JsonResult getArticleTroubleList(@RequestParam Map<String, Object> params) {

        return articleService.getArticleTroubleList(params);
    }


}
